package com.huaxin.common.Entity;

import com.chad.library.adapter.base.entity.AbstractExpandableItem;
import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.List;

/**
 * @author songxf
 * @date 2018/6/8
 * @Desc 第二层
 * Copyright HUAXIN DATA. All rights reserved.
 */
public class HxMaintenanceSecondDTO extends AbstractExpandableItem<HxMaintenanceSecondDTO> implements MultiItemEntity {

    /**
     * id : o_959_MV68E7
     * text : 水果湖污水处理公司
     * isLeaf : 0
     * children : [{"id":"s_963_VVXM1K","text":"牡丹村","isLeaf":1,"children":[]},{"id":"s_964_7LQU37","text":"牡丹村2","isLeaf":1,"children":[]},{"id":"s_962_L3YZ4E","text":"弥陀","isLeaf":1,"children":[]}]
     */

    private String                       id;
    private String                       text;
    private int                          isLeaf;
    private List<HxMaintenanceSecondDTO> children;
    private int                          level;
    private int                          itemType;

    public void setLevel(int level) {
        this.level = level;
    }

    public void setItemType(int itemType) {
        this.itemType = itemType;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public int getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(int isLeaf) {
        this.isLeaf = isLeaf;
    }

    public List<HxMaintenanceSecondDTO> getChildren() {
        return children;
    }

    public void setChildren(List<HxMaintenanceSecondDTO> children) {
        this.children = children;
    }

    //动态更改层级
    @Override
    public int getLevel() {
        return level;
    }

    //布局
    @Override
    public int getItemType() {
        return itemType;
    }
}
